import { View } from "@tarojs/components";
import { Checkbox,Button } from "@taroify/core"

type DraftsItemProps = {
  item: {
    id: string;
    checkDate: string;
    type: string;
    state: string;
  };
};
const DraftsItem: React.FC<DraftsItemProps> = ({item}) => {
  return (
  <View className="w-full p-3 bg-white rounded-lg shadow-sm inline-block relative">
    <View className="flex justify-between ">
      <Checkbox className="flex text-base">
        {item.checkDate}-食品安全检查
      </Checkbox>
      <View className="flex text-red-500 bg-red-100 p-1 rounded text-xs">{item.state}</View>
    </View>
    <View className="py-2 text-slate-500">
      自查日期：{item.checkDate}
    </View>
    <View className="pb-3 text-slate-500">
      报备类型：{item.type}
    </View>
    <Button color="primary" size="small" className="absolute right-3 text-center">删除</Button>
  </View>
  )
};

export default DraftsItem;
